#include "portagelistimpl.h"
#include "mainapp.h"
//
portageListImpl::portageListImpl ( QWidget * parent, Qt::WFlags f )
		: QWidget ( parent, f ), m_model ( NULL ) /*, m_delegate ( NULL )*/ {
	setupUi ( this );
}
//



void portageListImpl::listCategory ( QListWidgetItem * item ) {
	if ( m_model ) delete m_model;
	m_model = new EbuildsItemModel ( this );

	QString cat = item->text();
	if ( cat == MainApp::allText() )
		m_model->initPackets ();
	else
		m_model->initPackets ( cat );

	ebuildsList->setModel ( m_model );

}
